﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Settings.aspx.cs" Inherits="WebApplication1.Settings" MasterPageFile="~/masterpage/User.Master" %>

<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="ContentPlaceHolder1">
    <%--Begin Loading ajax section--%>
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1">
        <ProgressTemplate>
            <div style="position: fixed; text-align: center; height: 100%; width: 100%; top: 0; right: 0; left: 0; z-index: 9999999; background-color: #000000; opacity: 0.7;">
                <div class="center">

                    <img alt="" src="images/loading.gif" />
                </div>
            </div>
        </ProgressTemplate>
    </asp:UpdateProgress>
    <%--End Loading ajax section--%>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <div class="container-fluid">

                <div class="control-group col-md-12">
                    <fieldset>
                        <legend>Setting Page </legend>
                        <asp:EntityDataSource ID="EntityDataSource1" runat="server" ConnectionString="name=FosIntelEntities" DefaultContainerName="FosIntelEntities" EnableFlattening="False" EntitySetName="fos_Setting" EnableDelete="True" EnableInsert="True" EnableUpdate="True">
                        </asp:EntityDataSource>

                        <asp:ListView ID="lsvSetting" runat="server" DataSourceID="EntityDataSource1" DataKeyNames="Id">
                            <AlternatingItemTemplate>
                                <tr style="">
                                    <td>
                                        <%--  <asp:Button ID="DeleteButton" runat="server" class="btn btn-primary" CommandName="Delete" Text="Delete" />--%>
                                        <asp:Button ID="EditButton" runat="server" class="btn btn-primary" CommandName="Edit" Text="Edit" />
                                    </td>

                                    <td>
                                        <asp:Label ID="ParamNameLabel" runat="server" Text='<%# Eval("ParamName") %>' />
                                    </td>
                                    <td>
                                        <input type='<%# String.Equals(Eval("ParamName"),"password") ? "password" : "Text"  %>' id="ParamValueLabel" runat="server" value='<%# Eval("ParamValue") %>' disabled class="form-control" />
                                    </td>
                                </tr>
                            </AlternatingItemTemplate>
                            <EditItemTemplate>
                                <tr style="">
                                    <td>
                                        <asp:Button ID="UpdateButton" runat="server" class="btn btn-primary" CommandName="Update" Text="Update" />
                                        <asp:Button ID="CancelButton" runat="server" class="btn btn-primary" CommandName="Cancel" Text="Cancel" />
                                    </td>

                                    <td>
                                        <input type="text" id="ParamNameTextBox" runat="server" value='<%# Bind("ParamName") %>' disabled />
                                    </td>
                                    <td>
                                        <input type='<%# String.Equals(Eval("ParamName"),"password") ? "password" : "Text"  %>' id="ParamValueLabel" runat="server" value='<%# Bind("ParamValue") %>' class="form-control" />
                                    </td>
                                </tr>
                            </EditItemTemplate>
                            <EmptyDataTemplate>
                                <table runat="server" style="">
                                    <tr>
                                        <td>No data was returned.</td>
                                    </tr>
                                </table>
                            </EmptyDataTemplate>

                            <ItemTemplate>
                                <tr style="">
                                    <td>
                                        <%--     <asp:Button ID="DeleteButton" runat="server" class="btn btn-primary"  CommandName="Delete" Text="Delete" />--%>
                                        <asp:Button ID="EditButton" runat="server" class="btn btn-primary" CommandName="Edit" Text="Edit" />
                                    </td>

                                    <td>
                                        <asp:Label ID="ParamNameLabel" runat="server" Text='<%# Eval("ParamName") %>' />
                                    </td>
                                    <td>
                                        <input type='<%# String.Equals(Eval("ParamName"),"password") ? "password" : "Text"  %>' id="ParamValueLabel" runat="server" value='<%# Eval("ParamValue") %>' disabled class="form-control" />
                                    </td>
                                </tr>
                            </ItemTemplate>
                            <LayoutTemplate>



                                <table id="itemPlaceholderContainer" runat="server" border="0" class="table table-striped table-condensed center-table">
                                    <tr runat="server" class="info">
                                        <th runat="server"></th>

                                        <th runat="server">Setting Name</th>
                                        <th runat="server">Setting Value</th>
                                    </tr>
                                    <tr id="itemPlaceholder" runat="server">
                                    </tr>
                                    <%-- <tr runat="server">
                                        <td runat="server" style="">
                                            <asp:DataPager ID="DataPager1" runat="server">
                                                <Fields>
                                                    <asp:NextPreviousPagerField ButtonType="Button" ShowFirstPageButton="True" ShowLastPageButton="True" />
                                                </Fields>
                                            </asp:DataPager>
                                        </td>
                                    </tr>--%>
                                </table>

                            </LayoutTemplate>
                            <SelectedItemTemplate>
                                <tr style="">
                                    <td>
                                        <%--   <asp:Button ID="DeleteButton" runat="server" CommandName="Delete" Text="Delete" />--%>
                                        <asp:Button ID="EditButton" runat="server" class="btn  btn-primary" CommandName="Edit" Text="Edit" />
                                    </td>

                                    <td>
                                        <asp:Label ID="ParamNameLabel" runat="server" Text='<%# Eval("ParamName") %>' />
                                    </td>
                                    <td>
                                        <asp:Label ID="ParamValueLabel" runat="server" Text='<%# Eval("ParamValue") %>' />
                                    </td>
                                </tr>
                            </SelectedItemTemplate>
                        </asp:ListView>
                    </fieldset>

                </div>
            </div>
            
        </ContentTemplate>
    </asp:UpdatePanel>
    <script src="js/prettify.js"></script>
            <script type="text/javascript" src="js/moment.js"></script>
            <script type="text/javascript" src="js/bootstrap-datetimepicker.js"></script>
            <script type="text/javascript" src="js/ru.js"></script>
          <%--  <script type="text/javascript">
                $(function () {
                    $('#ContentPlaceHolder1_lsvSetting_ParamValueLabel_0').datetimepicker({
                        format: 'HH:mm',
                        pickDate: false,
                        minuteStepping: 30,
                        pick12HourFormat: false
                    });
                });
            </script>--%>
</asp:Content>

